#pragma once

#include "ListData.h"
#include <pimstore.h>

class ListDataPoom : public CListBase
{
public:

  ListDataPoom(HWND hWnd, const TCHAR* szCategory = NULL);
  virtual ~ListDataPoom();

  virtual void Clear();

  void Reload(const TCHAR* szCategory = NULL);
  bool ReloadItem(CEOID oid);

  const TCHAR* GetCategory() const
  { return categoryName; }
  bool IsFavoritesCat() const
  { return isFavoritesCat; }

  void PopulateSim();

protected:
  bool PrepareItemColl(const TCHAR* szCategory);
  void Populate();

  bool FillContact(CListItemPoom* pItem, IContact* pContact, bool fillGroup, bool reload = false);

  bool SetDialingNumber(CEOID oId, IContact* pContact, TCHAR* tszNumber, TCHAR* tszSuffix, int nMaxLength, CEPROPID& propId);

protected:
  IFolder* pCurrFldr;
  IPOutlookItemCollection* pItemCol;
  
  bool  bOnlyFavorites;

  TCHAR categoryName[CATEGORY_TEXT_LENGTH];
  bool  isFavoritesCat;
};
